package com.qiang.test02;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

public class MyThreadPoolExecutor {
    public static void main(String[] args) {
        new ThreadPoolExecutor(
                3,//核心线程
                5,//最大限度线程
                5, //空闲线程存活时间
                TimeUnit.SECONDS,//空闲线程存活时间单位
                new ArrayBlockingQueue<>(10),//队列
                Executors.defaultThreadFactory(),//默认线程工厂
                new ThreadPoolExecutor.AbortPolicy());

    }
}
